package chpt07;

public class ThrowTest {

	public static int max(int[] arr, int begin, int end){
		if(begin < 0|| end > arr.length - 1)
			throw new IllegalArgumentException("begin < 0 or end > length-1. begin = "+begin+" end = "+end);
		if(begin>end)
			throw new IllegalArgumentException("begin > end, begin = "+begin+" end = "+end);
		//your code	
		return 1;
		
		
	}

	public static void main(String[] args) {

	}
}
